package com.jemmyee.pizza.entity;
// default package

import java.util.Date;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.Id;
import javax.persistence.Table;
import javax.persistence.Temporal;
import javax.persistence.TemporalType;
import javax.persistence.Transient;

import org.hibernate.annotations.GenericGenerator;


/**
 * Apply entity. @author MyEclipse Persistence Tools
 */
@Entity
@Table(name="apply"
    ,catalog="milestone.dbo"
)

public class Apply  implements java.io.Serializable {


    // Fields    

     private Integer applyId;
     private Integer customType = 0 ;
     private String customName;
     private String contacter;
     private String cardId;
     private String telNo;
     private String address;
     private Integer amount;
     private Date startDate;
     private String info;
     private Integer payType = 0 ;
     private String instalOpinion;
     private String department;
     private String shenqingJingban;
     private String kanceJingban;
     private String shouliJingban;
     private Date shenqingDate ;
     private Date kanceDate ;
     private Date shouliDate ;
     
     private String addressExtend ;
     
     private Integer initPayType ;
     private Double initPrice ;
     private Integer openPayType ;
     private Double openPrice ;
     
     private String icCard ;
     private String hwCard ;
     
     private String meterName ;
     private Integer meterType ;
     
     private Integer status ;

     private Integer changeAble ;
     private Integer editAble ;
     private Integer reProcessAble ;
     private Integer processAble ;
     
     private String statusView ;
     
     
     
    // Constructors

    /** default constructor */
    public Apply() {
    }

    
    /** full constructor */
    public Apply(Integer customType, String customName, String contacter, String cardId, String telNo, String address, Integer amount, Date startDate, String info, Integer payType, String instalOpinion, String department, String shenqingJingban, String kanceJingban, String shouliJingban) {
        this.customType = customType;
        this.customName = customName;
        this.contacter = contacter;
        this.cardId = cardId;
        this.telNo = telNo;
        this.address = address;
        this.amount = amount;
        this.startDate = startDate;
        this.info = info;
        this.payType = payType;
        this.instalOpinion = instalOpinion;
        this.department = department;
        this.shenqingJingban = shenqingJingban;
        this.kanceJingban = kanceJingban;
        this.shouliJingban = shouliJingban;
    }

   
    // Property accessors
    @GenericGenerator(name="generator", strategy="increment")@Id @GeneratedValue(generator="generator")
    
    @Column(name="apply_id", unique=true, nullable=false)

    public Integer getApplyId() {
        return this.applyId;
    }
    
    public void setApplyId(Integer applyId) {
        this.applyId = applyId;
    }
    
    @Column(name="custom_type")

    public Integer getCustomType() {
        return this.customType;
    }
    
    @Transient
    public String getCustomTypeView(){
    	if(customType == 0){
    		return "零散户" ;
    	}else if(customType == 1){
    		return "集体户" ;
    	}else if(customType == 2){
    		return "商业用户" ;
    	}else{
    		return "零散户" ;
    	}
    }
    
    public void setCustomType(Integer customType) {
        this.customType = customType;
    }
    
    @Column(name="custom_name", length=50)

    public String getCustomName() {
        return this.customName;
    }
    
    public void setCustomName(String customName) {
        this.customName = customName;
    }
    
    @Column(name="contacter", length=50)

    public String getContacter() {
        return this.contacter;
    }
    
    public void setContacter(String contacter) {
        this.contacter = contacter;
    }
    
    @Column(name="card_id", length=20)

    public String getCardId() {
        return this.cardId;
    }
    
    public void setCardId(String cardId) {
        this.cardId = cardId;
    }
    
    @Column(name="tel_no", length=20)

    public String getTelNo() {
        return this.telNo;
    }
    
    public void setTelNo(String telNo) {
        this.telNo = telNo;
    }
    
    @Column(name="address", length=1000)

    public String getAddress() {
        return this.address;
    }
    
    public void setAddress(String address) {
        this.address = address;
    }
    
    @Column(name="amount")

    public Integer getAmount() {
        return this.amount;
    }
    
    public void setAmount(Integer amount) {
        this.amount = amount;
    }
@Temporal(TemporalType.DATE)
    @Column(name="startDate", length=0)

    public Date getStartDate() {
        return this.startDate;
    }
    
    public void setStartDate(Date startDate) {
        this.startDate = startDate;
    }
    
    @Column(name="info", length=2000)

    public String getInfo() {
        return this.info;
    }
    
    public void setInfo(String info) {
        this.info = info;
    }
    
    @Column(name="pay_type")

    public Integer getPayType() {
        return this.payType;
    }
    
    @Transient
    public String getPayTypeView(){
    	if(payType == 0){
    		return "现金缴费" ;
    	}else if(payType == 1){
    		return "气票缴费" ;
    	}else if(payType == 2){
    		return "卡扣费" ;
    	}else{
    		return "现金缴费" ;
    	}
    }
    
    public void setPayType(Integer payType) {
        this.payType = payType;
    }
    
    @Column(name="instal_opinion", length=2000)

    public String getInstalOpinion() {
        return this.instalOpinion;
    }
    
    public void setInstalOpinion(String instalOpinion) {
        this.instalOpinion = instalOpinion;
    }
    
    @Column(name="department", length=100)

    public String getDepartment() {
        return this.department;
    }
    
    public void setDepartment(String department) {
        this.department = department;
    }
    
    @Column(name="shenqing_jingban", length=100)

    public String getShenqingJingban() {
        return this.shenqingJingban;
    }
    
    public void setShenqingJingban(String shenqingJingban) {
        this.shenqingJingban = shenqingJingban;
    }
    
    @Column(name="kance_jingban", length=100)

    public String getKanceJingban() {
        return this.kanceJingban;
    }
    
    public void setKanceJingban(String kanceJingban) {
        this.kanceJingban = kanceJingban;
    }
    
    @Column(name="shouli_jingban", length=100)

    public String getShouliJingban() {
        return this.shouliJingban;
    }
    
    public void setShouliJingban(String shouliJingban) {
        this.shouliJingban = shouliJingban;
    }

    @Temporal(TemporalType.DATE)
    @Column(name="shenqing_date", length=0)
	public Date getShenqingDate() {
		return shenqingDate;
	}


	public void setShenqingDate(Date shenqingDate) {
		this.shenqingDate = shenqingDate;
	}

	@Temporal(TemporalType.DATE)
    @Column(name="kance_date", length=0)
	public Date getKanceDate() {
		return kanceDate;
	}


	public void setKanceDate(Date kanceDate) {
		this.kanceDate = kanceDate;
	}

	@Temporal(TemporalType.DATE)
    @Column(name="shouli_date", length=0)
	public Date getShouliDate() {
		return shouliDate;
	}


	public void setShouliDate(Date shouliDate) {
		this.shouliDate = shouliDate;
	}

	@Column(name="status")
	public Integer getStatus() {
		return status;
	}


	public void setStatus(Integer status) {
		this.status = status;
	}

	@Transient
	public String getStatusView() {
		return statusView;
	}


	public void setStatusView(String statusView) {
		this.statusView = statusView;
	}

	
	@Transient
	public Integer getChangeAble() {
		return changeAble;
	}


	public void setChangeAble(Integer changeAble) {
		this.changeAble = changeAble;
	}


	@Transient
	public Integer getEditAble() {
		return editAble;
	}


	public void setEditAble(Integer editAble) {
		this.editAble = editAble;
	}

	@Transient
	public Integer getReProcessAble() {
		return reProcessAble;
	}


	public void setReProcessAble(Integer reProcessAble) {
		this.reProcessAble = reProcessAble;
	}

	@Transient
	public Integer getProcessAble() {
		return processAble;
	}


	public void setProcessAble(Integer processAble) {
		this.processAble = processAble;
	}

	@Column(name="address_extend")
	public String getAddressExtend() {
		return addressExtend;
	}


	public void setAddressExtend(String addressExtend) {
		this.addressExtend = addressExtend;
	}

	@Column(name="init_pay_type")
	public Integer getInitPayType() {
		return initPayType;
	}
	@Transient
	public String getInitPayTypeView(){
		if(this.initPayType != null && this.initPayType == 0){
			return "现金" ;
		}else if(this.initPayType != null && this.openPayType == 1){
			return "刷卡" ;
		}
		return null ;
	}


	public void setInitPayType(Integer initPayType) {
		this.initPayType = initPayType;
	}

	@Column(name="init_price")
	public Double getInitPrice() {
		return initPrice;
	}


	public void setInitPrice(Double initPrice) {
		this.initPrice = initPrice;
	}

	@Column(name="open_pay_type")
	public Integer getOpenPayType() {
		return openPayType;
	}
	@Transient
	public String getOpenPayTypeView(){
		if(this.openPayType != null && this.openPayType == 0){
			return "现金" ;
		}else if(this.openPayType != null && this.openPayType == 1){
			return "刷卡" ;
		}
		return null ;
	}


	public void setOpenPayType(Integer openPayType) {
		this.openPayType = openPayType;
	}

	@Column(name="open_price")
	public Double getOpenPrice() {
		return openPrice;
	}


	public void setOpenPrice(Double openPrice) {
		this.openPrice = openPrice;
	}

	@Column(name="ic_card")
	public String getIcCard() {
		return icCard;
	}


	public void setIcCard(String icCard) {
		this.icCard = icCard;
	}

	@Column(name="hw_card")
	public String getHwCard() {
		return hwCard;
	}


	public void setHwCard(String hwCard) {
		this.hwCard = hwCard;
	}

	@Column(name="meter_name")
	public String getMeterName() {
		return meterName;
	}


	public void setMeterName(String meterName) {
		this.meterName = meterName;
	}

	@Column(name="meter_type")
	public Integer getMeterType() {
		return meterType;
	}
	@Transient
	public String getMeterTypeView(){
		if(this.getMeterType() != null && this.getMeterType() == 0){
			return "户内" ;
		}else if(this.getMeterType() != null && this.getMeterType() == 1){
			return "户外" ;
		}
		return null ;
	}


	public void setMeterType(Integer meterType) {
		this.meterType = meterType;
	}
   








}